/***************************************************************************************************
  *Copyright(C),2010-2017,Sumscope
  *FileName	:  CBondInfoDebug.h
  *Author	:  scofined.qi
  *Version	:  1.0
  *Date		:  2017/08/08
  *Desc		:  //用于主要说明此程序文件完成的主要功能
  *Relation :  
  *Others	:  //其他内容说明
  *Function :  //主要函数列表，每条记录应包含函数名及功能简要说明
  *History	:  //修改历史记录列表，每条修改记录应包含修改日期、修改者及修改内容简介
***************************************************************************************************/
#pragma once
#include <memory>
#include <core/Utility.h>
#include "../bondlib.h"
#include "BondFilterFunc.h"
#include "qbprotocol/include/SSFilters.h"

class CBondInfoImpl;
class CAdditionBondInfo;
class S_BONDLIB_EXPORT CBondInfoDebug{
private:
	CBondInfoImpl*			m_impl = nullptr;		// 可能为空,如果为空,那么必须通过m_stub加载进来

public:
	CBondInfoDebug();
	~CBondInfoDebug();
	CBondInfoDebug(const CBondInfoDebug& bi);
	CBondInfoDebug& operator= (const CBondInfoDebug& bi);
	CBondInfoDebug& Clone(const CBondInfoDebug& bi);
public:
	CBondInfoImpl* GetBondPtr(int usage = -1, int usage2 = -1) const{ return m_impl; }
	bool IsInMemory() const;
	int  GetBytes() const;

public:
	virtual void	Clear();//初始化数据	
	bool	IsCodeEqualTo(const char * szBondID, const char * szListedMarket) const;
	bool	IsKeyEqualTo(const char * szBondKey, const char * szListedMarket) const;
	//设置成员参数
public:
	//2016/04/08 by devin.zhang:
	enum FilterCallbackType
	{
		FCT_NULL = 0,
		FCT_TYPE,	//产品类型
	};

	//2016/12/08 by devin.zhang: 
	enum IssueTypes
	{
		IssueNONE = 0,	//未定义
		IssueRAT,		//利率
		IssuePRC,		//价格
		IssueSPD,		//利差
		IssueAMT,		//数量招标
	};
	//typedef bool(__stdcall *_BONDFILTER)(UINT nBondType, const ThisType& bi);

	class MAP_BONDFILTER
	{
	public:
		typedef std::map<uint32_t, _BONDFILTER>::iterator ITR;
		std::map<uint32_t, _BONDFILTER> mapFilter;
	};

public:
	void	SetBondKey(const char * szKey);							//m_sBondKey
	void	SetBondCode(const char * szCode);							//m_sBondID
	void	SetListedMarket(const char * szListedMarket);				//m_sListedMarket
	void	SetCombBondKey(const char * szKey);						//m_sCombBondKey
	void	SetCombBondCode(const char * szCode);						//m_sCombBondID

	//m_sJianpin
	//m_sQuanpin 由SetBondShortName函数设置

	void	SetMarketType(const char *szMarketType);					//m_sMarketType
	void	SetBondSubType(const char *szBondSubType);					//m_sBondSubType
	void	SetIssuerRating(const char *szIssuerRating);				//m_sIssuerRating
	void	SetIssuerRatingInstitutionCode(const char *sIssuerRatingInstitutionCode);//m_sIssuerRatingInstitutionCode
	void	SetBondRating(const char *szCurrent);						//m_sBondRating
	void	SetInstitutionRating(const char * sInstitutionRating);		//m_sInstitutionRating;
	void	SetListDate(const char *szListDate);						//m_sListDate

	void	SetInterestStartDate(const char *szStartdate);			//m_sInterestStartDate
	void	SetMaturityDate(const char *szDate);						//m_sMaturityDate
	void	SetPaymentDate(const char * szPaymentDate);				//m_sPaymentDate
	void	SetPayDate(int nDate);								//m_nPayDate
	void	SetOptionDate(const char *szOptionDate);					//m_sOptionDate
	void	SetRateType(const char *szRateType);						//m_sRateType
	void	SetCouponType(const char *szCouponType);					//m_sCouponType
	void	SetCouponFrequency(const char * szCouponFrequency);		//m_sCouponFrequency
	void	SetCompoundFrequency(const char * szCompoundFrequency);	//m_sCompoundFrequency
	void	SetInterestBasis(const char * szInterestBasis);			//m_sInterestBasis

	void	SetCBRRating(const char* szCBRRating);
	void SetChinaDCState(const char* szChinaDCState);

	void	SetCDCRating(const char * szCDCRating);
	void	SetCSIRating(const char * szCSIRating);
	void	SetCurrency(const char* szCurrency);

	void	SetOptionType(const char * szOptionType);					//m_sOptionType
	void	SetMaturityTerm(const char * szMaturityTerm);				//m_sMaturityTerm
	void	SetTermToMaturity(const char * szTermToMaturity);			//m_sTermToMaturity
	void	SetFRNIndexID(const char *szIndexID);						//m_sFRNIndexID
	void	SetFixingMADays(const char* szFixingMADays);				//m_sFixingMADays
	void	SetCouponRateCurrent(const char* szCouponRateCurrent);	//m_sCouponRateCurrent
	void	SetWarranter(const char* szWarranter);					//m_Warranter
	void	SetBondTag(const char* szBondTag);						//m_BondTag

	void	SetPlannedIssueAmount(double fPlannedIssueAmount);		//m_fPlannedIssueAmount
	void	SetActualIssueAmount(double fActualIssueAmount);			//m_fActualIssueAmount
	void	SetOutstandingAmount(double fOutstandingAmount);			//m_fOutstandingAmount
	void	SetIssuerCode(const char * szIssuerCode);					//m_sIssuerCode
	void	SetInstitutionType(const char* szInsType);				//m_sInstitutionType

	void	SetYieldCurveType(const char *szCurveType);				//m_sYieldCurveType

	//void	SetCSYield(const char *szYield);							//m_sCSYield	
	//void	SetCSCleanPrice(const char *szPrice);						//m_sCSCleanPrice
	//void	SetCSModifyDuration(const char *szDuration);				//m_sCSModifyDuration
	//void	SetCSDate(UINT nCSDate);								//m_nCSDate


	void	SetAutcionType(const char * szAutcionType);					//m_sAutcionType
	void	SetAuctionDateStart(const char * szAuctionDateStart);		//m_sAuctionDateStart
	void	SetAuctionDateEnd(const char * szAuctionDateEnd);			//m_sAuctionDateEnd
	void	SetAuctionDateTime(const char * szAuctionDateTime);		//m_sAuctionDateTime
	void	SetAnnounceDate(const char * szAnnounceDate);				//m_sAnnounceDate
	void	SetIssueType(const char * szIssueType);						//m_sIssueType
	void	SetIssueStartDate(const char * szIssueStartDate);			//m_sIssueStartDate
	void	SetIssueEndDate(const char * szIssueEndDate);				//m_sIssueEndDate
	void	SetIssueEndTime(const char * szIssueEndTime);				//m_sIssueEndTime
	void	SetIssuePeriod(const char * szIssuePeriod);				//m_sIssuePeriod
	void	SetAuctionTimeStart(int nAuctionTimeStart);					//m_nAuctionTimeStart
	void	SetAuctionTimeEnd(int nAuctionTimeEnd);						//m_nAuctionTimeEnd

	void	SetQuotTopflag(int tp);									//m_nIsQuotTopflag
	void	SetWarrant(const char* szWarrant);						//m_sWarrant
	void	SetMortgage(char sMortgage);								//m_sMortgage
	void	SetCrossmarket(char sCrossmarket);						//m_sCrossmarket
	void	SetMunicipal(char sMunicipal);							//m_sIsMunicipal

	//m_bidinfo
	//m_askinfo
	//	bool	SetPriceInfo( REPORT * pReport, int bidask );				//m_bidinfo,m_askinfo

	void	SetMainUnderwriters(const char * sUnderwriters);			//m_sMainUnderwriters
	void	SetJointUnderwriters(const char * sUnderwriters);			//m_sJointUnderwriters
	void	SetUnderwrites(const char * sUnderwrites);					//m_sUnderwrites
	void	SetBidLimitBottom(const char * sBid);						//m_sBidLimitBottom
	void	SetBidLimitTop(const char * sBid);							//m_sBidLimitTop

	void	SetAuctionFlr(const char * sAuction);						//m_sAuction_Flr
	void	SetAuctionCap(const char * sAuction);						//m_sAuction_Cap
	void	SetAuctionStep(const char * sStep);						//m_sAuction_Step	
	void	SetAuctionUnit(const char * sUnit);						//m_sAuction_Unit

	void	SetRemainDate(const char * sRemainDate);					//m_sRemainDate
	void	SetBondName(const char * szName);							//m_sFullName
	void	SetBondShortName(const char *szShortName);				//m_sShortName,m_sJianpin,m_sQuanpin
	void	SetBondNameEn(const char* szNameEn);						//m_sFullNameEn
	void	SetBondShortNameEn(const char* szShortNameEn);			//m_sShortNameEn

	void    SetOutlook(const char * sOutlook);							//Outlook
	void    SetEntCor(const char *sEntCor);								//EntCor

	void	SetBondFileNum(int nBondFileNum);							//m_nBondFileNum
	void	SetAdditionInfoIndex(int nIndex);							//m_nAdditionInfoIndex
	void	SetOptionInfoIndex(int nIndex);								//m_nOptionInfoIndex


	void    SetIssueRate(const char * sIssueRate);						//m_IssueRate
	void	SetPlannedExerciseDate(const char * sDate);					//m_PlannedExerciseDate 
	void    SetNextCoupon_Date(const char *sDate);						//m_NextCoupon_Date
	void    SetConversionRate(const char* sRate);						//m_ConversionRate
	void	SetAssetStatus(const char* sAssetStatus);					//m_sAssetStatus
	void	SetPrincipalPayType(const char* sPrincipayPayType);			//m_sPrincipayPayType

	void	SetCdcAuth(int nCdcAuth);									//m_nCdcAuth;
	void	SetExpireInHoliday(bool bHoliday);							//m_bExpireInHoliday

	void	SetSceniority(const char* szSceniority);
	void	SetCategoryFlag(const char* szSceniority);

	//得到成员函数,内联函数为了更好的效率
public:
	const char * GetBondKey()		const;		//m_sBondKey
	const char * GetBondCode()		const;		//m_sBondID
	const char * GetListedMarket()	const;	//m_sListedMarket 获取市场代码
	const char * GetCombBondKey()	const;	//m_sCombBondKey 获取bondkey+market  eg: **********.CIB,  ****************.SSE,  **************.SZE
	const char * GetCombBondCode()	const;	//m_sCombBondID  获取bondcode+market  eg:  600000,   600000.SH,    600000.SZ

	std::string GetBondJianpin()	const;//m_sJianpin
	std::string GetBondQuanpin()	const;//m_sQuanpin
	const char * GetMarketType()	const;	//m_sMarketType
	const char * GetBondSubType()	const;	//m_sBondSubType
	const char * GetIssuerRating()	const;	//m_sIssuerRating
	const char * GetIssuerRatingInstitutionCode() const; //m_sIssuerRatingInstitutionCode
	const char * GetInstitutionRating() const;//m_sInstitutionRating

	const char * GetBondRating()	const;	//m_sBondRating
	const char * GetListDate()		const;		//m_sListDate
	const char * GetInterestStartDate() const;//m_sInterestStartDate
	const char * GetMaturityDate()	const;	//m_sMaturityDate
	const char * GetPaymentDate()	const;	//m_sPaymentDate
	int GetPayDate()		const;	//m_nPayDate

	const char * GetOptionDate()	const;	//m_sOptionDate
	const char * GetRateType()		const;		//m_sRateType
	const char * GetCouponType()	const;	//m_sCouponType
	const char * GetCouponFrequency() const;	//m_sCouponFrequency
	const char * GetCompoundFrequency() const; //m_sCompoundFrequency
	const char * GetInterestBasis() const;//m_sInterestBasis
	const char * GetOptionType()	const;	//m_sOptionType
	const char * GetMaturityTerm()	const;	//m_sMaturityTerm
	const char*	 GetTermToMaturity() const;//根据相关条件特别处理了	 //修正的m_sTermToMaturity
	const char*	 GetTermToMaturity2D() const;//m_sTermToMaturity

	const char * GetFRNIndexID()	const;		//m_sFRNIndexID
	const char * GetFixingMADays()	const;	//m_sFixingMADays
	const char * GetCouponRateCurrent()	const;	//m_sCouponRateCurrent
	const char * GetWarranter() const;			//m_Warranter
	const char * GetBondTag() const;			//m_BondTag

	double		 GetPlannedIssueAmount() const;	//m_fPlannedIssueAmount
	double		 GetActualIssueAmount()	const;	//m_fActualIssueAmount
	double		 GetOutstandingAmount() const;	//m_fOutstandingAmount
	const char * GetIssuerCode() const;			//m_sIssuerCode
	const char * GetInstitutionType() const;	//m_sInstitutionType


	const char * GetYieldCurveType()	const;	//m_sYieldCurveType

	//const char * GetCSYield()			const;				//m_sCSYield	
	//const char * GetCSCleanPrice()		const;			//m_sCSCleanPrice
	//const char * GetCSModifyDuration()	const;		//m_sCSModifyDuration
	//UINT		 GetCSDate()			const;				//m_nCSDate

	const char * GetAutcionType()		const;		//m_sAutcionType
	const char * GetAuctionDateStart()	const;
	const char * GetAuctionDateEnd()	const;
	const char * GetAuctionDateTime()	const;
	const char * GetAnnounceDate()		const;
	int			 GetIssueType();
	// PRIM - 3130  利差的判断条件：Auction表Auction_Type=SPD 或 bond表Coupon_Type=FRN  申购页面
	int			 GetIssueTypePurchase();
	const char * GetIssueStartDate()	const;
	const char * GetIssueEndDate()		const;
	const char * GetIssueEndTime()		const;
	const char * GetIssuePeriod()		const;
	int			 GetAuctionTimeStart()	const;
	int			 GetAuctionTimeEnd()	const;

	int			 GetIsQuotTopflag()		const;
	char		 GetMortgage()			const;
	char		 GetCrossmarket()		const;
	char		 GetIsMunicipal()		const;

	const char * GetWarrant()			const;
	const char * GetMainUnderwriters()	const;	//m_sMainUnderwriters
	const char * GetJointUnderwriters() const;	//m_sJointUnderwriters
	const char * GetUnderwrites()		const;		//m_sUnderwrites
	const char * GetBidLimitBottom()	const;	//m_sBidLimitBottom
	const char * GetBidLimitTop()		const;		//m_sBidLimitTop

	const char * GetAuctionFlr()		const;		//m_sAuction_Flr
	const char * GetAuctionCap()		const;		//m_sAuction_Cap
	const char * GetAuctionStep()		const;		//m_sAuction_Step
	const char * GetAuctionUnit()		const;		//m_sAuction_Unit

	const char * GetRemainDate()		const;
	const char * GetCategoryFlag()		const;

	std::string GetBondName()			const;		//m_sFullName
	const char * GetBondShortName()	const;		//中文：m_sShortName;  英文:m_sFullNameEn
	std::string GetBondNameEn()		const;	//m_sFullNameEn
	std::string GetBondShortNameEn()	const;	//m_sShortNameEn

	const char * GetOutlook()			const;
	const char * GetEntCor()			const;

	int			 GetBondFileNum()		const;		//m_nBondFileNum
	int			 GetOptionInfoIndex()	const;		//m_nOptionInfoIndex

	const char *    GetIssueRate()				const;
	const char *	GetPlannedExerciseDate()	const;
	const char *    GetNextCoupon_Date()		const;
	const char *    GetConversionRate()			const;
	const char*		GetAssetStatus()			const;		//m_sAssetStatus
	const char* GetPrincipalPayType() const;
	bool IsAmortizing() const;//提前还本
	bool IsNonAmortizing() const;//到期一次还本

	
	const char *  GetCBRRating() const;
	const char *  GetChinaDCState() const;

	const char *  GetCDCRating() const;
	const char *  GetCSIRating() const;
	const char *  GetCurrency() const;

	int			GetCdcAuth()		const;		//m_nCdcAuth
	int			GetOutlookLevel()	const;
	bool		IsExpireInHoliday() const;		//m_bExpireInHoliday
	//////////////////////////////////////////////////////////////////////
	// 
	//其它函数
public:
	const CAdditionBondInfo* GetAdditionInfo() const;					//m_nAdditionInfoIndex
	bool	IsAddIssueBond() const;									//判断是否增续发
	bool	IsFilterOutAddIssueBond() const;							//true表示需要过滤掉增续发券

	//const CBondOptionInfo*	GetOptionInfo();				//m_nOptionInfoIndex

	long	GetRemainedDays(time_t tNow) const;		//返回剩余期限加号前的时间
	const char * GetRemainPeriod(time_t tNow) const;	//获取剩余期限
	const char* GetRemainPeriodByIntTime(time_t tNow) const;	//获取剩余期限
	std::string GetHistoryRemainPeriod(time_t tday) const;	//获取任意时刻的剩余期限
	float	GetRemainYear(time_t tNow) const;			//获取剩余期限，返回浮点，单位年
	float	GetRemainYearToOption(time_t tNow) const;	//获取到行权日的剩余期限，返回浮点，单位年
	int		GetStorageBytes(int offset) const;
	int		GetMemoryBytes(int& validbytes) const;
	int		GetFieldByOffset(int offset, void* buf, int capcity, int& type) const;
	static void RecordRepeatCheck();
	static void ChangeFieldMode(bool getName);
	//static void CheckEqual(CBondInfoDebug* impl, CBondInfoOld* old);
	// 只能用于内部测试
	CBondInfoImpl* InternalGetImplPtr();
public:
	void SetValidity(bool valid);

	// Attributes
	bool	IsValidBond() const;		// 债券信息是否正确
	bool	IsExpireBond() const;		// 已过期债券
	bool	IsRight() const;			// 是否权证
	bool	IsNewBond() const;			// 是否新发债
	bool	IsWarranted() const;		// 债券是否担保
	bool	IsRebated() const;			// 债券是否一级半，新发债
	bool	IsMortgage() const;			// 债券是否可质押
	bool	IsCrossMarket() const;		// 债券是否跨市场
	bool	IsSOEenterType() const;		// 债券是否国企债
	bool	IsRatingDebt() const;		// 是否利率债
	bool	IsMunicipal() const;		// 是否城投债
	bool	IsInterbank() const;			// 是否银行间
	bool	IsExchange() const;			// 是否交易所
	bool	IsSSEBond()const;			// 是否上交所债券
	bool	IsSZEBond()const;			// 是否深交所债券
	bool	IsBSEBond()const;			// 是否北交所债券
	bool    IsFinanceBond() const;		//是否金融债
	bool	IsCNYBond() const;			//是否人民币债券

	bool	GetQuotTopflag() const;		// 取置顶报价
	int		DigitBit() const;			// 得到价格有几位小数位

	bool	MatchJianpin(const char* pstr) const;	//简拼匹配
	bool	MatchQuanpin(const char* pstr) const;	//全拼匹配


	//@add by tony 20160218
	bool	CheckCommonUseType(const BLHCONDITION & Cond ) const;	//判断常用：电力、钢铁等项
	bool	CheckCommonUseType(uint32_t nSubType) const;
	bool	IsCommonUseType(const char* sType, int swLevel = 2) const;


	bool	CheckBondTypeNew(const BLHCONDITION& Cond)const;		//判断产品类型，5.5.3新版筛选，最优报价
	bool	CheckBondTypeNew(uint32_t nSubType) const;

	bool	CheckCmbcBondType(BLHCONDITION & Cond) const;		//判断产品类型：金融债、短融、中票或私募 ABS
	bool	CheckCmbcBondType(uint32_t nSubType) const;

	bool	CheckBjrcbBondType(BLHCONDITION & Cond) const;		//判断产品类型：国债、金融债、短融、中票、ABS、PPN
	bool	CheckBjrcbBondType(uint32_t nSubType) const;

	bool	CheckNbcbCDBondType(BLHCONDITION & Cond) const;
	bool	CheckNbcbCDBondType(uint32_t nSubType) const;

	bool	CheckNbcbIRDBondType(BLHCONDITION & Cond) const;
	bool	CheckNbcbIRDBondType(uint32_t nSubType) const;

	bool	CheckNbcbIssueBondType(BLHCONDITION & Cond) const;
	bool	CheckNbcbIssueBondType(uint32_t nSubType) const;

	bool	ShortCheckBondType(const BLHCONDITION & Cond) const;//短融、超短融类型判断,add bushion 20150810
	bool	ShortCheckBondType(uint32_t nSubType) const;//短融、超短融类型判断,add bushion 20150810

	bool	CheckHYBondType(const BLHCONDITION & Cond) const;		//宏源旗舰店产品类型判断 add bushion 2016229
	bool    CheckHYBondType(uint32_t nSubType) const;

	bool	CheckComplexBondType(const BLHCONDITION & Cond) const;
	bool    CheckComplexBondType(uint32_t nSubType) const;

	bool	CheckBankBondType(const BLHCONDITION& Cond)const;	//判断产品类型: 国有大型银行、股份制银行、城商行、农商行、其他银行
	bool	CheckBontSubType(const BLHCONDITION & Cond ) const;	//判断产品类型细分：细分 例如国债：记账式国债、储蓄国债、凭证式国债
	bool	CheckBontSubType(const char* pSubType) const;

	bool	CheckRightEx(const BLHCONDITION& Cond) const;		//含权类型
	bool	CheckIssuer(const BLHCONDITION & Cond) const;		//判断发行人
	bool	CheckGuarantor(const BLHCONDITION& Cond) const;		//担保人
	bool	CheckSector(const BLHCONDITION & Cond ) const;		//判断行业
	bool	CheckSector2021(const BLHCONDITION& Cond) const;		//判断2021申万行业
	bool	CheckArea(const BLHCONDITION & Cond) const;			//判断地区
	bool	CheckMainUnderwriter(const BLHCONDITION& condStr) const;	//判断主承机构

	bool	CheckDebtRating(const BLHCONDITION & Cond ) const;	//判断债项  m_sBondRating
	bool	CheckFinDebt(const BLHCONDITION & Cond ) const;		//判断金融债：国开，非国开
	// add  by lbl  
	bool	CheckNCDRating(const BLHCONDITION& Cond) const;		//判断NCD 评级  add  by lbl
	// end  
	bool	CheckIssueYear(const BLHCONDITION & Cond) const;		//判断发行年份
	bool	CheckIssueYear(int nYear) const;
	bool	CheckIssueYear(int nBegin, int nEnd) const;
	bool	CheckUnderwriter(const BLHCONDITION & Cond ) const;	//判断在团	
	bool	IsTransBond() const;								//CVB或者SCV
	bool    IsCVBBond() const; //不可分离债，深交所的可转债判定标准
	bool	IsBondBankSecond() const;		//银行二级债
	bool	IsBondBankPerpetual() const;	//银行永续债
	bool	IsBondTLAC()const;	//TLC

	bool	IsBondCommercialBank() const;	//商业银行债
	bool	IsPolicyBankSecond() const;	//政策性次级
	bool	IsBondSceniority()const;	//次级债，产品提新分类方式

	bool	IsBondFinancialInstitutions()const;	// 金融机构债
	bool	IsCreditBond(const BLHCONDITION & Cond ) const;		//信用债,利率债

	bool	is_interest_bond() const;
	bool	is_credit_bond() const;
	bool    is_industry_bond()const; //是否产业债

	bool	IsSuperNewBond(const BLHCONDITION & Cond) const;		//超级新债通
	bool	IsInDays(const BLHCONDITION & Cond ) const;			//年份：在发行、公告、缴款或者上市日期间 超级新债通过滤时间
	bool	CheckIssueState(BLHCONDITION & Cond) const;	//发行状态判断:不限、发行中、已发行、预发行

	bool	CheckAssetStatus(const BLHCONDITION & Cond) const;	//发行，公募，私募，小私募
	bool	CheckAssetStatus(uint32_t nStatus) const;
	bool	CheckABSCoupon(const BLHCONDITION & Cond) const;	//ABS票面
	bool	CheckABSCoupon(int nCouponType) const;
	bool	CheckCouponRate(const BLHCONDITION& Cond) const;	//票面利率

	bool	CheckMuniArea(const BLHCONDITION& Cond)const;		//判断城投地区
	bool	CheckLocalBondArea(const BLHCONDITION& Cond)const;		//判断地方债地区
	bool	CheckCategoryFlag(const BLHCONDITION& Cond)const;		//专项债
	
	const char * GetArea(bool eng = false) const;			//地区名称
	const char * GetSwSector(bool eng = false) const;		//一级行业名称
	const char * GetSwSubSector(bool eng = false) const;		//二级行业名称
	const char * GetInstitutionShortName(bool eng = false) const;//机构简称
	const char * GetInstitutionFullName(bool eng = false) const;//发行人机构全称
	const char * GetRatingInstitutionShortName(bool eng = false) const;//评级机构简称

	const char * GetCouponTypeName(bool eng = false) const;		//票面利率方式名称
	const char * GetOptionTypeName(bool eng = false) const;		//行权方式名称
	const char * GetOutlookName(bool eng = false) const;			//展望名称
	const char * GetIssuerBondRating() const;	//主体与债项评级组合字段
	const char * GetIssuerRatingEx() const;	//m_sInstitutionRating为AAA+时，返回aaa+，否则返回m_sIssuerRating

	bool CheckBondSubType(const std::string& sType) const;//2016/08/29,bushion.xin:判断m_SubType

	//产品债券类型判断函数，非通用的需要自己重写判断函数
	bool IsBondCountry() const;		//国债   1
	bool IsBondCenter() const;		//央票	 2
	bool IsBondFinance() const;		//金融债 3
	bool IsBondLocal() const;		//地方债 4
	bool IsBondShort() const;       //短融中包括超短融 5
	bool IsBondShort_S() const;     //短融中去掉超短融 5
	bool IsBondCShort() const;      //超短融 6
	bool IsBondChina() const;		//中票   7

	bool IsBondEnterpr() const;		//企业债 8
	bool IsBondCorporate() const;	//公司债 9 （不含非公开公司债）
	bool IsBondNonPublicCor() const;//非公开公司债 10
	bool IsBondCOP() const;			//公司债（所有公司债，含9，10）

	bool IsBondPPN() const;			//PPN  11
	bool IsBondNCD() const;			//NCD  12
	bool IsBondABS() const;			//ABS  13
	bool IsBondPrivate() const;		//私募债 包括10和11


	bool IsBondSecondCapital() const;//二级资本债 15
	bool IsBondPDB() const;			 //熊猫债     16
	bool IsBondGKZ() const;			 //国开债     17

	bool IsBondOther() const;		 //其它债     18  暂停使用，各页面自己负责其它债逻辑处理


	bool IsPrivateDebet() const;	//私募债，包括PPN和ABS 


	bool IsPrivateCorpBond() const; //私募公司债
	bool IsPubliceCorpBond() const;  //公募公司债
	bool IsETSBond() const; //true表示永续债
	bool IsListedCompany() const;				//true表示上市公司债券
	bool IsCBRC_Financing_Platform() const;	//true表示平台债				

	bool IsCDCAuthValid() const; //是否有中债估值权限

	bool IsGreenBond(void) const;	//是否绿色债
	bool IsCarbonNeutrality(void) const;//是否碳中和

	bool IsBondInsurance(void) const; //是否保险债
};
